import {createRouter, createWebHashHistory} from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('../views/LoginView.vue')
        },
        {
            path: '/home',
            name: 'home',
            component: () => import('../views/HomeView.vue'),
            redirect: '/home/home_about',
            children: [
                {
                    path: 'home_about',
                    name: 'home_about',
                    component: () => import('../views/H1View.vue')
                },
                {
                    path: 'home_h2',
                    name: 'home_h2',
                    component: () => import('../views/H2View.vue')
                },
                {
                    path: 'home_h3',
                    name: 'home_h3',
                    component: () => import('../views/H3View.vue')
                },
                {
                    path: 'home_h4',
                    name: 'home_h4',
                    component: () => import('../views/H4View.vue')
                },
                {
                    path: '/two',
                    name: 'two',
                    component: () => import('../views/TwoView.vue')
                }
            ]
        },

        {
            path: '/:pathMatch(.*)*',
            name: 'notFound',
            component: () => import('../views/NotFoundView.vue')
        }
    ]
})
export default router